//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.baidu.lbsapi.auth.tracesdk;

import android.content.Context;
import java.util.HashMap;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;

class c {
    private Context a;
    private HashMap b = null;
    private c.a c = null;

    protected c(Context var1) {
        this.a = var1;
    }

    protected void a(HashMap var1, c.a var2) {
        this.b = this.a(var1);
        this.c = var2;
        (new Thread(new d(this))).start();
    }

    static void a(c arg0, String arg1) {
        arg0.a(arg1);
    }

    static Context a(c arg1) {
        return arg1.a;
    }

    static HashMap b(c arg1) {
        return arg1.b;
    }

    private void a(String var1) {
        if(var1 == null) {
            var1 = "";
        }

        JSONObject var2 = null;

        try {
            if(!(var2 = new JSONObject(var1)).has("status")) {
                var2.put("status", -1);
            }
        } catch (JSONException var4) {
            var2 = new JSONObject();

            try {
                var2.put("status", -1);
            } catch (JSONException var3) {
                var3.printStackTrace();
            }
        }

        if(this.c != null) {
            this.c.a(var2.toString());
        }

    }

    private HashMap a(HashMap var1) {
        HashMap var2 = new HashMap();
        Iterator var3 = var1.keySet().iterator();

        while(var3.hasNext()) {
            String var4 = ((String)var3.next()).toString();
            var2.put(var4, var1.get(var4));
        }

        return var2;
    }

    interface a {
        void a(String var1);
    }
}
